New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove text and field queries #4033
Comments
++ |
Also remove |
The `text` query was replaced by the `match` query and has been deprecated for quite a while. The `field` query should be replaced by a `query_string` query with the `default_field` specified. Fixes elastic#4033
The `text` query was replaced by the `match` query and has been deprecated for quite a while. The `field` query should be replaced by a `query_string` query with the `default_field` specified. Fixes elastic#4033
I lament this decision, queryString is a very loose interface when trying to construct queries dynamically in Java. it seems we're now reduced to string concat ("field:value") instead of the much more robust fieldQuery(field, value). |
you can use match query on specific fields. If you still want to have the query string syntax that the field query supported, you can use query_string query, and set the default field on it (this is exactly what the field query was doing behind the scenes). |
Changes: * Adapt ESConnection.count() to use a top-level `query` parameter * Use `term` query instead of `text` * Don't expect a hard-coded `"ok": true` from response References: * http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/breaking-changes.html * http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/_return_values.html#_return_values * http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/_search_requests.html#_search_requests * elastic/elasticsearch#4033 * elastic/elasticsearch#4310 Thanks @luizgpsantos for estensive support
text query has been deprecated in elasticsearch 0.90 and removed in elasticsearch 1.0. match query should be used instead. elastic/elasticsearch#4033
text
query has been replaced bymatch
query and been deprecate for some time.field
query is very confusing, its effectively the Lucene query string syntax on a specific field, but its not evident from the name (can be confuse withmatch
). It would be much better to remove it, and ask people to usequery_string
with a properly set default field. This is much more explicit regarding what it does.The text was updated successfully, but these errors were encountered: